package com.spring.wx.oauth.dao;

import com.spring.wx.oauth.entity.EmployeeSalaryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Copyright: yueyong (c) 2022
 *
 * @author he.shaorong
 * @version 1.0
 * @date 2022/4/17
 */
@Mapper
public interface EmployeeSalaryMapper {

    @Select("SELECT * FROM employee_salary_info WHERE mobile_phone= #{phoneNumber} AND state !=-1 and state !=-10 ORDER BY id DESC LIMIT 1")
    List<EmployeeSalaryEntity> getRecordsFrom(long phoneNumber);


    @Select("SELECT * FROM employee_salary_info WHERE mobile_phone= #{phoneNumber} AND state !=-1 and state !=-10 and send_type=1 ORDER BY id desc")
    List<EmployeeSalaryEntity> getSlaryDataList(long phoneNumber);

    @Select("SELECT * FROM employee_salary_info WHERE id= #{id}")
    List<EmployeeSalaryEntity> getSlaryDetailById(long id);
}
